<?php

declare(strict_types=1);

namespace Modules\Purchasing\Models;

use Catch\Base\CatchModel as Model;

/**
 * @property $id
 * @property $purchasewarehousing_id
 * @property $giveaway
 * @property $quantity
 * @property $creator_id
 * @property $created_at
 * @property $updated_at
 * @property $deleted_at
 * @property $provisionalschedule_id
*/
class PurchasewarehousingGiveaway extends Model
{
    

    protected $table = 'purchasewarehousing_giveaway';

    protected $fillable = [ 'id', 'purchasewarehousing_id', 'giveaway', 'creator_id', 'created_at', 'updated_at', 'deleted_at', 'provisional_id', 'purchaseorder_id', 'purchaseorderschedule_id','supplier_id','inspectionlisttable_id','fields1','fields2','fields3','fields4','fields5','fields6','fields7','fields8','fields9','fields10'];

    /**
     * @var array
     */
    protected array $fields = ['id','purchasewarehousing_id','giveaway', 'creator_id','created_at','updated_at','provisional_id', 'purchaseorder_id', 'purchaseorderschedule_id','supplier_id','inspectionlisttable_id','fields1','fields2','fields3','fields4','fields5','fields6','fields7','fields8','fields9','fields10'];

    /**
     * @var array
     */
    protected array $form = ['id','purchasewarehousing_id','giveaway', 'creator_id','created_at','updated_at','provisional_id', 'purchaseorder_id', 'purchaseorderschedule_id','supplier_id','inspectionlisttable_id','fields1','fields2','fields3','fields4','fields5','fields6','fields7','fields8','fields9','fields10'];

    

    // /**
    //  * @var array
    //  */
    // public array $searchable = [
    //     'supplierOrder' => 'like',
    //     'remarks' => 'like',
    //     'state' => 'like',
    // ];
    
    //输出相应的时间格式
    protected function serializeDate($date)
    {
        return $date->format('Y-m-d H:i');
    }


    
}
